package com.landcode.land.data.canal.util;

import java.net.InetSocketAddress;

public class CanalUtil {

    public static InetSocketAddress stringToAddress(String server) {
        if (server != null) {
            String[] ipAndPort = server.split(":");
            return new InetSocketAddress(ipAndPort[0], Integer.valueOf(ipAndPort[1]));
        }
        return null;
    }
}
